Fix mutates-arguments warning for `sort`
authorMattias Engdegård <mattiase@acm.org>
Sun, 31 Mar 2024 14:12:45 +0000 (16:12 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 1 Apr 2024 07:42:46 +0000 (09:42 +0200)
commit155462a1bd7909074f79a534324c7b209eb97142
tree33b41880e90e73592247d7aaf0c24906b249a629
parent0f504dde3388687d1214182fa519354146947635
Fix mutates-arguments warning for `sort`

* lisp/emacs-lisp/bytecomp.el (bytecomp--sort-call-in-place-p)
(bytecomp--mutargs-nconc, bytecomp--mutargs-sort): New.
(byte-compile-form, bytecomp--actually-important-return-value-p)
(mutating-fns):
Use a slightly more extendible scheme for specifying what arguments
a function mutates.  Give `sort` special treatment.
lisp/emacs-lisp/bytecomp.el